import { dialog } from '@gis/lib/components/antd-dialog';

export function openInstructionTemplateAddEditDialog(data) {
  return new Promise((resolve, reject) => {
    dialog({
      content: () => import('./AddEdit.vue'),
      contentProps: { data: data },
      dialogProps: {
        width: 'medium',
        title: '发送指令',
        bodyStyle: { padding: '20px' },
        afterClose: () => resolve(),
        onOk: () => resolve(),
        onCancel: () => reject(),
      },
    });
  });
}
